﻿using Coldairarrow.Entity.DTO;
using Coldairarrow.Entity.PB;
using Coldairarrow.Util;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace Coldairarrow.Business.PB
{
    public partial interface IPB_ProcecureBusiness
    {
        Task<PageResult<PB_ProcecureDTO>> GetDataListAsync(PageInput<ConditionDTO> input);
        Task<PageResult<PB_Procecure>> GetDataListByDepartmentAsync(string DeptId);
        Task<PB_Procecure> GetTheDataAsync(string id);
        Task<List<PB_ProcecureDTO>> GetDataListAsync(PB_ProcecureInputDTO input);
        Task<List<PB_ProcecureDTO>> GetTreeDataListAsync(PB_ProcecureInputDTO input);
        Task AddDataAsync(PB_Procecure data);
        Task UpdateDataAsync(PB_Procecure data);
        Task AddDataAsyncs(PB_ProcecureInputDTO input);
        Task UpdateDataAsyncs(PB_ProcecureInputDTO input);
        Task DeleteDataAsync(List<string> ids);
    }


    [Map(typeof(PB_Procecure))]
    public class PB_ProcecureEditInputDTO : PB_Procecure
    {
        public List<PB_Procecure> permissionList { get; set; } = new List<PB_Procecure>();
    }

    public class PB_ProcecureInputDTO
    {
        public string[] ActionIds { get; set; }
        public string parentId { get; set; }
        public bool selectable { get; set; }
        public bool checkEmptyChildren { get; set; }
    }
   public class Base_ActionDTO : TreeModel
    {

        public String Code { get; set; }
        public String Name { get; set; }
        public String Remarks { get; set; }
        public List<string> PermissionValues { get; set; }
    }
}